/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author diego
 */
@Entity
@Table(name = "TipoEscaner")
public class TipoEscaner implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Basic(optional = false)
    @Column(name = "idTipoEscaner")
    private Integer idTipoEscaner;
    @Column(name = "descripcion")
    private String descripcion;
    @Column(name = "nombreTiposcanner")
    private String nombreTiposcanner;
    @OneToMany(mappedBy = "idTipoEscaner")
    private List<Modelo> modelo;

    public TipoEscaner() {
    }

    public TipoEscaner(Integer idTipoEscaner) {
        this.idTipoEscaner = idTipoEscaner;
    }

    public Integer getIdTipoEscaner() {
        return idTipoEscaner;
    }

    public void setIdTipoEscaner(Integer idTipoEscaner) {
        this.idTipoEscaner = idTipoEscaner;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public String getNombreTiposcanner() {
        return nombreTiposcanner;
    }

    public void setNombreTiposcanner(String nombreTiposcanner) {
        this.nombreTiposcanner = nombreTiposcanner;
    }

    public List<Modelo> getModeloCollection() {
        return modelo;
    }

    public void setModeloCollection(List<Modelo> modeloCollection) {
        this.modelo = modeloCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTipoEscaner != null ? idTipoEscaner.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoEscaner)) {
            return false;
        }
        TipoEscaner other = (TipoEscaner) object;
        if ((this.idTipoEscaner == null && other.idTipoEscaner != null) || (this.idTipoEscaner != null && !this.idTipoEscaner.equals(other.idTipoEscaner))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return nombreTiposcanner;
    }
}
